package cn.com.demo.microservice.anquan.controller;

import cn.com.demo.microservice.anquan.service.IAccountService;
import cn.com.demo.microservice.entity.AqAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountController {
    @Autowired
    private IAccountService accountService;
    @PostMapping("/add")
    public int addAccount(@RequestBody AqAccount account){
        int accId = -1;
        accId = this.accountService.addAccount(account);
        return accId;
    }
}
